/**
 * 项目基础数据仓库
 */
import _config from "../../../../config/config"
const state = {
	user: {},
}

const mutations = {
	setUser(state, user) {
		state.user = user;
	},
	
}

const actions = {
	getUser(context) {
		this.$http.get("/host/stgl/userInfo.html")
		.then(result => {
			if(result.login){
				context.commit("setUser", result);
			}else{
				window.location.href =_config._WEB_SERVER + "/stgl/#/login";
			}
		});
	},
	
}

export default {
	state,
	mutations,
	actions
}